Skip to content

docs: guide for adding a notebook (CI, Colab, exclusion lists) - #174

Merged
bendichter merged 2 commits into
masterfrom
docs-notebook-ci-guide
Jun 16, 2026
Merged

bendichter merged 2 commits into
masterfrom
docs-notebook-ci-guide

Conversation

@bendichter

Copy link
Copy Markdown
Member

Adds docs/adding-notebooks.md, a contributor guide for what happens to a notebook after a PR is opened. The root README's submission section already covers file layout + environment.yml, but nothing documented the CI/Colab machinery — this fills that gap and links to it from the README.

Covers

  • The Colab-bootstrap cells — the 4-cell pattern (badge → install intro → pinned install cell → restart admonition) and what each does.
  • Generating the install cell — uv pip compile with --constraint .github/colab-preinstalled.txt, --python-version 3.12 --python-platform linux; why fully-pinned; the nbformat_minor gotcha.
  • How CI tests notebooks — test-changed-notebooks.yml (PR) and test-all-notebooks-weekly.yml, how run_notebook.py extracts pins → installs → stubs the install cell → runs under ipython, and the "fresh-env, no preinstalled safety net" consequence.
  • Headless gotchas — what fails (plotly fig.show(), cv2.imshow, %matplotlib widget, input(), webbrowser.open) vs. what's fine (plt.show(), IFrame), with the one-line plotly renderer fix.
  • The three .github lists — colab-preinstalled.txt, notebook-test-exclusions.txt ("skip in CI"), notebook-colab-exclusions.txt ("no Colab button") — what each does and how they're independent.

Docs-only; no notebook or workflow changes.

🤖 Generated with Claude Code

New docs/adding-notebooks.md explains what happens to a notebook after a PR:
the Colab-bootstrap install cell and how to generate its pins (uv pip compile
constrained to .github/colab-preinstalled.txt), how the CI test workflows run
notebooks headlessly via run_notebook.py, headless-execution gotchas (plotly
fig.show, cv2.imshow, interactive backends, input), and the three .github
lists (colab-preinstalled, notebook-test-exclusions, notebook-colab-exclusions)
and how they differ. Linked from the README submission section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
github-actions Bot added a commit that referenced this pull request Jun 16, 2026
@github-actions

github-actions Bot commented Jun 16, 2026 •

Copy link
Copy Markdown
Contributor

Preview for this PR has been removed (PR closed).

Add a 'Stream data from the DANDI Archive' section (and checklist item):
notebooks should stream assets via remfile/fsspec rather than downloading
files or reading local paths, so they run unattended in CI and Colab.
Includes the remfile + DandiAPIClient pattern, disk-cache tip, and a note
that hardcoded local paths are a common exclusion reason.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bendichter
bendichter merged commit d0754e3 into master Jun 16, 2026
3 checks passed
github-actions Bot added a commit that referenced this pull request Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant